import { IamInfo } from '../controller/iamInfo'
import { InvestmentDao } from './../dao/investmentDao'
import { Investment } from '../model/investment'
export class InvestmentService {
  private readonly investmentDao = new InvestmentDao()
  queryInvestmentList(params: any): Promise<Array<Investment>> {
    params.creator = IamInfo.id
    return this.investmentDao.queryInvestmentList(params)
  }
  deleteInvestment(params: any): Promise<number> {
    return this.investmentDao.deleteInvestment(params)
  }
  upsertInvestment(params: any): Promise<any> {
    params.creator = IamInfo.id
    params.updater = IamInfo.id
    return this.investmentDao.upsertInvestment(params)
  }
}